<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>祝姐姐生日快乐！</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- 配置Tailwind自定义颜色和字体 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        birthday: {
                            pink: '#FF6B8B',
                            purple: '#A855F7',
                            gold: '#FBBF24',
                            light: '#FFF5F8'
                        }
                    },
                    fontFamily: {
                        happy: ['"Nunito"', 'cursive', 'sans-serif']
                    }
                }
            }
        }
    </script>
    
    <style type="text/tailwindcss">
        @layer utilities {
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .text-shadow-lg {
                text-shadow: 0 4px 8px rgba(0,0,0,0.2);
            }
            .animate-float {
                animation: float 6s ease-in-out infinite;
            }
            .animate-pulse-slow {
                animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
            }
            .bg-glass {
                background: rgba(255, 255, 255, 0.25);
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
            }
        }
        
        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
            100% { transform: translateY(0px); }
        }
        
        /* 星星动画 */
        .star {
            position: absolute;
            background-color: white;
            border-radius: 50%;
            animation: twinkle 2s infinite alternate;
        }
        
        @keyframes twinkle {
            from { opacity: 0.5; transform: scale(0.8); }
            to { opacity: 1; transform: scale(1); }
        }
        
        /* 气球动画 */
        .balloon {
            position: absolute;
            border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
            animation: rise 20s linear infinite;
        }
        
        .balloon::after {
            content: '';
            position: absolute;
            width: 5px;
            height: 20px;
            background-color: inherit;
            bottom: -15px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 0 0 5px 5px;
        }
        
        @keyframes rise {
            0% { transform: translateY(100vh) rotate(0deg); opacity: 0.8; }
            100% { transform: translateY(-100vh) rotate(10deg); opacity: 0.4; }
        }

        /* 移动设备优化 */
        @media (max-width: 640px) {
            .mobile-p-4 {
                padding: 1rem !important;
            }
            .mobile-mb-6 {
                margin-bottom: 1.5rem !important;
            }
            .mobile-text-sm {
                font-size: 0.875rem !important;
            }
        }
    </style>
    
    <!-- 导入字体 -->
    <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap" rel="stylesheet">
</head>
<body class="min-h-screen font-happy bg-gradient-to-br from-birthday-purple/90 to-birthday-pink/90 text-white overflow-x-hidden relative">
    <!-- 动态星星背景 -->
    <div id="stars-container" class="fixed inset-0 pointer-events-none"></div>
    
    <!-- 顶部标题 -->
    <header class="pt-8 pb-4 px-4 text-center relative z-10">
        <h1 class="text-[clamp(1.5rem,8vw,3rem)] font-extrabold text-shadow-lg animate-pulse-slow leading-tight">
            <i class="fa fa-birthday-cake mr-2 text-birthday-gold"></i>生日快乐，姐姐！
            <i class="fa fa-birthday-cake ml-2 text-birthday-gold"></i>
        </h1>
        <p class="mt-3 text-[clamp(0.9rem,3vw,1.1rem)] text-birthday-light/90 max-w-md mx-auto mobile-text-sm">
            愿所有的美好与你不期而遇，每一天都充满阳光与欢笑
        </p>
    </header>
    
    <!-- 主要内容区 -->
    <main class="container mx-auto px-4 py-6 relative z-10">
        <!-- 核心图片 -->
        <div class="max-w-full mx-auto mb-8 mobile-mb-6 transform transition-transform duration-500 hover:scale-[1.02]">
            <div class="bg-white/10 p-3 rounded-xl shadow-2xl backdrop-blur-sm mobile-p-4">
                <img src="1.png" 
                     alt="不管几岁 生日万岁" 
                     class="w-full h-auto rounded-lg shadow-lg"
                     loading="lazy">
            </div>
        </div>
        
        <!-- 祝福卡片 -->
        <div class="max-w-full mx-auto bg-glass rounded-2xl p-5 md:p-8 shadow-xl transform transition-all duration-500 hover:shadow-2xl mobile-p-4">
            <h2 class="text-[clamp(1.2rem,5vw,1.8rem)] font-bold mb-4 md:mb-6 text-center text-birthday-gold text-shadow">给姐姐的生日祝福</h2>
            
            <div class="space-y-3 md:space-y-4 text-[clamp(0.95rem,3vw,1.1rem)] leading-relaxed">
                <p>亲爱的姐姐：</p>
                
                <p>又到了属于你的特别日子，在这个充满喜悦的时刻，我想对你说：谢谢你一直以来的陪伴和照顾，你总是像一个小太阳一样温暖着身边的人。</p>
                
                <p>愿你每天都能笑得像孩子一样纯真，愿你的每一个梦想都能慢慢实现，愿生活给你所有的温柔和美好。</p>
                
                <p>不管几岁，你永远是我心中最棒的姐姐！生日快乐，我爱你！</p>
            </div>
            
            <div class="mt-6 md:mt-8 text-center">
                <div class="inline-flex gap-2">
                    <i class="fa fa-heart text-birthday-pink text-2xl animate-pulse"></i>
                    <i class="fa fa-heart text-birthday-purple text-2xl animate-pulse" style="animation-delay: 0.2s"></i>
                    <i class="fa fa-heart text-birthday-gold text-2xl animate-pulse" style="animation-delay: 0.4s"></i>
                    <i class="fa fa-heart text-birthday-purple text-2xl animate-pulse" style="animation-delay: 0.6s"></i>
                    <i class="fa fa-heart text-birthday-pink text-2xl animate-pulse" style="animation-delay: 0.8s"></i>
                </div>
            </div>
        </div>
        
        <!-- 年龄祝福 -->
        <div class="max-w-full mx-auto mt-8 md:mt-12 bg-white/10 backdrop-blur-sm rounded-xl p-5 text-center shadow-lg mobile-p-4">
            <p class="text-[clamp(1rem,3vw,1.2rem)] font-semibold">
                这是你人生中又一个精彩的篇章
            </p>
            <p class="mt-2 text-birthday-light/90 text-sm md:text-base">愿每一岁都奔走在自己的热爱里</p>
        </div>
    </main>
    
    <!-- 底部区域 -->
    <footer class="mt-10 md:mt-16 pb-6 px-4 text-center text-white/70 text-xs md:text-sm relative z-10">
        <p>用满满的爱意制作 ❤️</p>
        <p class="mt-1">祝姐姐生日快乐，永远幸福</p>
    </footer>
    
    <!-- 气球容器 -->
    <div id="balloons-container" class="fixed inset-0 pointer-events-none overflow-hidden"></div>
    
    <script>
        // 根据屏幕大小调整元素数量（优化移动端性能）
        const isMobile = window.innerWidth < 640;
        
        // 创建星星背景
        function createStars() {
            const container = document.getElementById('stars-container');
            const count = isMobile ? 50 : 100; // 手机端星星数量减半
            
            for (let i = 0; i < count; i++) {
                const star = document.createElement('div');
                star.classList.add('star');
                
                // 随机大小
                const size = Math.random() * 2 + 1; // 手机端星星略小
                star.style.width = `${size}px`;
                star.style.height = `${size}px`;
                
                // 随机位置
                star.style.left = `${Math.random() * 100}vw`;
                star.style.top = `${Math.random() * 100}vh`;
                
                // 随机动画延迟
                star.style.animationDelay = `${Math.random() * 2}s`;
                
                container.appendChild(star);
            }
        }
        
        // 创建气球
        function createBalloons() {
            const container = document.getElementById('balloons-container');
            const colors = ['#FF6B8B', '#A855F7', '#FBBF24', '#EC4899', '#8B5CF6', '#F59E0B'];
            const count = isMobile ? 5 : 8; // 手机端气球数量减少
            
            for (let i = 0; i < count; i++) {
                const balloon = document.createElement('div');
                balloon.classList.add('balloon');
                
                // 随机大小（手机端气球略小）
                const size = isMobile ? Math.random() * 20 + 30 : Math.random() * 30 + 40;
                balloon.style.width = `${size}px`;
                balloon.style.height = `${size * 1.2}px`;
                
                // 随机颜色
                balloon.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
                
                // 随机位置
                balloon.style.left = `${Math.random() * 100}vw`;
                balloon.style.bottom = `-100px`;
                
                // 随机动画延迟和持续时间
                const delay = Math.random() * 10;
                const duration = isMobile ? Math.random() * 20 + 30 : Math.random() * 30 + 40;
                balloon.style.animationDelay = `${delay}s`;
                balloon.style.animationDuration = `${duration}s`;
                
                container.appendChild(balloon);
            }
        }
        
        // 页面加载完成后创建元素
        window.addEventListener('DOMContentLoaded', () => {
            createStars();
            createBalloons();
            
            // 添加页面载入动画
            document.body.classList.add('opacity-0');
            setTimeout(() => {
                document.body.classList.add('transition-opacity', 'duration-1000');
                document.body.classList.remove('opacity-0');
            }, 100);
        });
    </script>
</body>
</html>